#ifndef OCK_MEMORY_BRIDGE_OCK_ADAPTER_DFT_FUNCTION_OPERATOR_TASK_H
#define OCK_MEMORY_BRIDGE_OCK_ADAPTER_DFT_FUNCTION_OPERATOR_TASK_H
#include <memory>
#include <functional>
#include "ock/acladapter/executor/OckAsyncResultInnerBridge.h"
#include "ock/acladapter/task/OckAsyncTaskExt.h"

namespace ock {
namespace acladapter {
class OckDftFunOp : public OckDftTaskFunOp
{
public:
    virtual ~OckDftFunOp() noexcept = default;
    explicit OckDftFunOp(std::function<hmm::OckHmmErrorCode()> funOp,
        OckTaskResourceType resourceType = OckTaskResourceType::DEVICE_STREAM);
    OckTaskResourceType ResourceType(void) const override;
    bool PreConditionMet(void) override;
    std::shared_ptr<_ResultT> Run(
        OckAsyncTaskContext &context, OckDftAsyncTaskParam &param, OckUserWaitInfoBase &waitInfo) override;
private:
    std::function<hmm::OckHmmErrorCode()> funOp;
    OckTaskResourceType resourceType;
};
using OckDftFunOpTask = OckAsyncTaskExt<OckDftAsyncTaskParam, OckDefaultResult, OckDftFunOp>;

}
}
#endif